package base_grammar

import "fmt"

type Person8 struct {
	name string
}

func (person Person8) showPerson() {
	fmt.Printf("person: %p\n", &person)
	person.name = "kite"
	fmt.Printf("person: %v\n", person)
}

func (person *Person8) showPerson2() {
	fmt.Printf("person2: %p\n", person)
	person.name = "kite"
	fmt.Printf("person2: %v\n", person)
}

func struct_f8() {
	var person = Person8{"tom"}
	fmt.Printf("person: %p\n", &person)
	person.showPerson()
	fmt.Printf("person: %v\n", person)

	var person2 = &Person8{"tom"}
	fmt.Printf("person2: %p\n", person2)
	person2.showPerson2()
	fmt.Printf("person2: %v\n", person2)
}
